package cn.wolfcode.business.util;

import java.util.Calendar;
import java.util.Date;

public class DateUtil {
    public  static Date changeDate(Date date,Integer type,Integer amount){
        if (date == null || type == null || amount == null){
            return null;
        }
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.add(type,amount);
        return calendar.getTime();
    }
}
